<!--
 * @Description: 
 * @Author: your name
 * @version: 
 * @Date: 2024-06-24 09:10:00
 * @LastEditors: your name
 * @LastEditTime: 2024-06-27 15:31:59
-->
<template>
  <a-menu @select="handleSelect" v-model:selectedKeys="current" mode="horizontal" :items="items" />
  <div style="position: absolute; z-index: 100" class="router-wrapper">
    <router-view></router-view>
  </div>
  <keep-alive>
    <CesiumView>
    </CesiumView>
  </keep-alive>
</template>
<script setup>
import router from '@/router'
import { h, ref } from 'vue';
import CesiumView from './views/CesiumView.vue'
import { InfoCircleOutlined, SettingOutlined } from '@ant-design/icons-vue';
const current = ref(['mail']);
const items = ref([
  {
    key: 'setBuild',
    icon: () => h(SettingOutlined),
    label: '楼房分户',
    title: '楼房分户',
  },
  {
    key: 'setInfo',
    icon: () => h(SettingOutlined),
    label: '房户信息',
    title: '房户信息',
  },
  {
    key: 'scanInfo',
    icon: () => h(InfoCircleOutlined),
    label: '信息查看',
    title: '信息查看',
  }
]);

const handleSelect=(e)=>{
  console.log(e);
  const {key}=e
  router.push(`/${key}`)
}
</script>

<style scoped>
.router-wrapper {
  width: 100%;
  /* 注意calc计算符号要保留空格 */
  height: calc(100% - 20px);
  pointer-events: none;
  padding: 20px;
}
</style>